namespace SeataNet.Core.Common
{
    /// <summary>
    /// 全局事务状态枚举
    /// </summary>
    public enum GlobalStatus
    {
        /// <summary>
        /// 未知
        /// </summary>
        Unknown = 0,

        /// <summary>
        /// 开始
        /// </summary>
        Begin = 1,

        /// <summary>
        /// 提交中
        /// </summary>
        Committing = 2,

        /// <summary>
        /// 提交重试中
        /// </summary>
        CommitRetrying = 3,

        /// <summary>
        /// 回滚中
        /// </summary>
        Rollbacking = 4,

        /// <summary>
        /// 回滚重试中
        /// </summary>
        RollbackRetrying = 5,

        /// <summary>
        /// 超时回滚中
        /// </summary>
        TimeoutRollbacking = 6,

        /// <summary>
        /// 超时回滚重试中
        /// </summary>
        TimeoutRollbackRetrying = 7,

        /// <summary>
        /// 异步提交中
        /// </summary>
        AsyncCommitting = 8,

        /// <summary>
        /// 已提交
        /// </summary>
        Committed = 9,

        /// <summary>
        /// 提交失败
        /// </summary>
        CommitFailed = 10,

        /// <summary>
        /// 已回滚
        /// </summary>
        Rollbacked = 11,

        /// <summary>
        /// 回滚失败
        /// </summary>
        RollbackFailed = 12,

        /// <summary>
        /// 超时回滚失败
        /// </summary>
        TimeoutRollbackFailed = 13,

        /// <summary>
        /// 已完成
        /// </summary>
        Finished = 14
    }
}
